This work describes and presents the properties of a proposed tuning system, which is compared with the well-known Pythagorean tuning system. Both systems are essentially algorithms that produce rational fractions from simple repeating algebraic rules. The rational fractions closely approximate the intervals of the twelve-tone equal temperament scale. Contrasting properties of the two algorithms are discussed, as well as the errors between the intervals they produce and the intervals of twelve-tone equal temperament. An important part of the proposed algorithm is the inverse fraction rule, which is a simple algebraic operation that produces, from any given interval, a musical inverse. The error of the musical inverse - relative to twelve-tone equal temperament - is shown to have a clear mathematical relationship with the error of the given interval fraction. If the given interval has a small error, then its musical inverse - as calculated by the inverse fraction rule - will also have a similarly small error with twelve-tone equal temperament.
In Western music, the most common tuning system since the eighteenth century has been twelve-tone equal temperament, which can be stated as follows:
As a result of this paradigm, the frequency-ratio between any adjacent semitones is simply the twelfth root of two:
Then, an interval of $i$ semitones has the following frequency-ratio, such that the upper note is $i$ semitones above the lower note:
Note that semitones are indicated by the spacings between adjacent keys on a piano, or lines and spaces on a musical staff. It is common for semitones to also be called half-steps.
Intervals can also be defined in terms of rational fractions, such that the numerator and denominator indicate the integer number of wavelengths between the precise overlap (constructive interference) of two sound waves. In this case, the fraction would also give the ratio of the acoustic frequencies, or equivalently, the ratio of the wavelengths. For instance, the frequency-ratio of $\frac{3}{2}$ would mean that the lower-pitch note has a wavelength that is exactly $1.5$ times longer than the wavelength of the higher-pitch note.
This has an important auditory implication relating to the beauty, or consonance, of the interval. That is, the wavelength ratio $\frac{3}{2}$ means that the two waves overlap every three wavelengths (for the higher-pitch sound wave) and every two wavelengths (for the lower-pitch sound wave).
In the case of the interval $\frac{3}{2}$, few wavelengths are required before the two waves overlap. As a result, the interval sounds consonant, pleasing, or perfect. In fact, the interval of the frequency-ratio $\frac{3}{2}$ is called a perfect fifth. Likewise, the intervals $\frac{2}{1}$ and $\frac{1}{1}$ are called perfect octaves and perfect unisons, as only two waves and one wave are required before perfect overlap, respectively.
Likewise, an interval in which many wavelengths are required before overlap, can often sound dissonant, ugly, or even devilish - as we shall see.
A sinusoidal visualization of overlapping sound waves will be presented at the end of this document.
Begin with the fraction $\large \frac{2}{1}$.
That is, we start with $\large \frac{2}{1}$, a perfect octave. Following the 1st rule:
$$\frac{2}{1} \rightarrow \frac{2}{2} = \frac{1}{1}$$The result is a perfect unison (the inverse of a perfect octave). Then, following the 2nd rule:
$$\frac{2 + 1}{1 + 1} = \frac{3}{2}$$The result is a perfect fifth. Next, repeat the two steps until (nearly) all the intervals of the twelve-tone scale are obtained.
Begin with the interval $\large (\frac{2}{3})^6 (2)^4$, which is $\large \frac{1024}{729}$
The pattern is only broken when the first exponent becomes zero, such that the first exponent remains zero for two intervals in a row.
That is, we start with $\large (\frac{2}{3})^6 (2)^4 = \frac{1024}{729}$, a diminished fifth. Following the 1st rule, we get: $\large (\frac{2}{3})^5 (2)^3 = \frac{256}{243}$, a minor second. Then, following the 2nd rule, we get: $\large (\frac{2}{3})^4 (2)^3 = \frac{128}{81}$, a minor sixth. Etc.
Take the inverse of $\frac{2}{1}$ and multiply by two...
Take $\frac{2}{1}$ and add one to the numerator and denominator...
Take the inverse of $\frac{3}{2}$ and multiply by two...
Take $\frac{3}{2}$ and add one to the numerator and denominator...
Take the inverse of $\frac{4}{3}$ and multiply by two...
Take $\frac{4}{3}$ and add one to the numerator and denominator...
Take the inverse of $\frac{5}{4}$ and multiply by two...
Take $\frac{5}{4}$ and add one to the numerator and denominator...
Take the inverse of $\frac{6}{5}$ and multiply by two...
Take $\frac{6}{5}$ and add one to the numerator and denominator...
Take the inverse of $\frac{7}{6}$ and multiply by two...
Take $\frac{7}{6}$ and add one to the numerator and denominator...
Take the inverse of $\frac{8}{7}$ and multiply by two...
Close approximations to all of the intervals in twelve-tone equal temperament have thus been calculated, except for the tritone.
Close approximations to all of the intervals in twelve-tone equal temperament have thus been calculated.
While it is clear - by the argument of overlap described earlier - why adding one to the numerator and denominator produces increasingly dissonant intervals, it remains unclear (to the author) why this rule produces close approximations to the twelve-tone intervals.
A musical inverse of an interval essentially means switching the order of the notes. An inverse-fraction rule is shown for finding the musical inverse.
Consider the initial interval of a perfect fifth in which the upper note is G and the lower note is C.

Before switching, the upper note (G) has $\frac{3}{2}$ the frequency of the lower note (C). That means the frequency-ratio of the lower note (C) to the upper note (G) is simply the mathematical inverse: $\frac{2}{3}$.
When the musical inverse is taken, the lower note is placed an octave higher and thus obtains twice the frequency. In mathematical terms, the ratio of the frequencies changes as follows when the inverse is taken:
Where $f_C$ is the frequency of C and $f_G$ is the frequency of G.
In short, the musical inverse of an interval is found by taking the inverse of the frequency-ratio and multiplying by two - a simple rule, which I have named the inverse fraction rule.
The proposed algorithm uses this method to obtain the musical inverse of notes. The inverse fraction rule also has an equivalent in twelve-tone equal temperament tuning.
In twelve-tone equal temperament tuning: if the notes were initially $i$ semitones apart (equivalently $i$ keys apart on a piano), they will be $12-i$ semitones apart after taking the musical inverse.
This is shown to be equivalent to the inverse fraction rule:
Let the upper note be $i$ semitones above the lower note. Then the initial frequency-ratio is the following:
The musical inverse is still the frequency-ratio such that the previous lower note is placed an octave higher:
Thus, the previous lower note is now $12 - i$ semitones above the previous upper note. In the earlier case of the perfect fifth, G was $7$ semitones above C. After taking the inverse, C became $12 - 7 = 5$ semitones above G, which is a perfect fourth.
Let $a$ and $b$ be non-zero real numbers. In the case of the twelve-tone scale: $a$ and $b$ are positive - representing wavelengths or frequencies, $n = 12$, and $k = 2$. However, we will show the result to be true in general.
We would like to show that if a given fraction has a small error with an interval in twelve-tone equal temperament, then the musical inverse of that fraction, as calculated by the inverse fraction rule, will also have a small error.
That is, if:
$$\large \frac{a}{b} \approx k^\frac{i}{n}$$Then:
$$\large \frac{kb}{a} \approx k^\frac{n - i}{n}$$Define $\epsilon$ as the initial error:
$$\large \epsilon = \frac{k^\frac{i}{n}}{\frac{a}{b}} - 1$$Define $\gamma$ in terms of $\epsilon$:
$$\large \gamma = \epsilon + 1$$Then we have:
$$\large \frac{a}{b} = \frac{1}{\gamma} k^\frac{i}{n}$$Rearranging algebraically, we get:
As $\epsilon \rightarrow 0$, we have that $\gamma \rightarrow 1$. Therefore:
$$\large \frac{kb}{a} \rightarrow k^{\frac{n-i}{n}}$$In summary, if the initial interval has an error-ratio with twelve-tone equal temperament of $\frac{1}{\gamma}$, the resultant musical inverse (following the inverse fraction rule) will have an error-ratio of $\gamma$.
import tuning
tuning.plot_errors()
tuning.plot_abs_errors()
Note how the progression from consonant to dissonant intervals is mirrored by the reducing aesthetic simplicity of the summed waves.
tuning.show_algorithm()